import request from '@/utils/request'

// 获取列表下拉框数据
export function getSelectAllData() {
  return request({
    url: '/invoice/sales_invoice/getSelectAllData',
    method: 'get'
  })
}

// 查询销项发票列表
export function listSales_invoice(query) {
  return request({
    url: '/invoice/sales_invoice/list',
    method: 'get',
    params: query
  })
}

// 查询销项发票详细
export function getSales_invoice(salesInvoiceId) {
  return request({
    url: '/invoice/sales_invoice/' + salesInvoiceId,
    method: 'get'
  })
}

// 新增销项发票
export function addSales_invoice(data) {
  return request({
    url: '/invoice/sales_invoice',
    method: 'post',
    data: data
  })
}

// 修改销项发票
export function updateSales_invoice(data) {
  return request({
    url: '/invoice/sales_invoice',
    method: 'put',
    data: data
  })
}

// 删除销项发票
export function delSales_invoice(salesInvoiceId) {
  return request({
    url: '/invoice/sales_invoice/' + salesInvoiceId,
    method: 'delete'
  })
}
